package com.demo.thread.sync;

import org.openjdk.jol.info.ClassLayout;

/**
 * @author : YU.TAN
 * @date : 2021/11/4 14:41
 */
public class Jol {
    public static void main(String[] args) {
        SyncNum syncNum=new SyncNum();
        System.out.println("加锁前：");
        System.out.println(ClassLayout.parseInstance(syncNum).toPrintable());
        System.out.println("加锁后：");
        synchronized (syncNum){
            System.out.println(ClassLayout.parseInstance(syncNum).toPrintable());
        }
    }
}
